package net.sk.china.platform.service.user;

import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import net.sk.china.platform.model.user.UserIntegralRecord;
import net.sk.china.platform.request.user.AdminIntegralSearchRequest;
import net.sk.china.platform.response.user.UserIntegralRecordResponse;
import net.sk.china.common.request.PageParamRequest;

import java.util.List;

/**
 * UserIntegralRecordService 接口 用户积分记录
 * +----------------------------------------------------------------------
 * // | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * // +----------------------------------------------------------------------
 * // | Copyright (c) 2018-2024 聊来 All rights reserved.
 * // +----------------------------------------------------------------------
 * // | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * // +----------------------------------------------------------------------
 * // | @Author: 聊来 <18970881148@qq.com>
 * // +----------------------------------------------------------------------
 * // | DateTime: 2024/6/3 10:11
 * // +----------------------------------------------------------------------
 */
public interface UserIntegralRecordService extends IService<UserIntegralRecord> {

    /**
     * 获取用户积分列表
     * @param request 搜索条件
     * @param pageParamRequest 分页参数
     * @return PageInfo<UserIntegralRecordResponse>
     */
    PageInfo<UserIntegralRecordResponse> findAdminList(AdminIntegralSearchRequest request, PageParamRequest pageParamRequest);


    /**
     * 获取积分、权益包记录
     * @param linkId 关联id
     * @param linkType 关联类型
     * @param uid 用户ID
     * @return UserIntegralRecord
     */
    UserIntegralRecord getByLinkIdAndLinkType(String linkId, String linkType, Integer uid);

    /**
     * 根据订单编号、uid获取记录列表
     * @param orderNo 订单编号
     * @param uid 用户uid
     * @return {@code List<UserIntegralRecord>}
     */
    List<UserIntegralRecord> findListByOrderIdAndUid(String orderNo, Integer uid);

    /**
     * 积分解冻
     */
    void integralThaw();
}
